﻿<%@ Page Title="User Management" Language="C#" MasterPageFile="~/App_MasterPages/Aquarius.Master"
    AutoEventWireup="true" CodeBehind="UserManagement.aspx.cs" Inherits="PepsiCo.UI.UserManagement" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CssContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ScriptContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $('#tbUsers tbody tr:odd').addClass('odd');
            $('#tbUsers tbody tr').hover(function () {
                $(this).addClass('hover');
            }, function () {
                $(this).removeClass('hover');
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="row-fluid">
        <div class="span12">
            <div class="head">
                <div class="isw-grid">
                </div>
                <h1>
                    List Of user</h1>
                <ul class="buttons">
                    <li>
                        <asp:LinkButton ID="lbtnAddUser" runat="server" ToolTip = "Add new user" CssClass="isw-plus"
                            onclick="lbtnAddUser_Click"/>
                    </li>
                </ul>
                <div class="clear">
                </div>
            </div>
            <div class="block-fluid">
                <table width="100%" cellspacing="0" cellpadding="0" class="table" id="tbUsers">
                    <thead>
                        <tr>
                            <th style="width: 30px">
                                No
                            </th>
                            <th>
                                User Name
                            </th>
                            <th>
                                Staff Name
                            </th>
                            <th>
                                Unit
                            </th>
                            <th style="width: 40px">
                                Action
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <asp:Repeater ID="rptObject" runat="server" OnItemCommand="rptObject_ItemCommand">
                            <ItemTemplate>
                                <tr>
                                    <td align="center">
                                        <%#(Container.ItemIndex +1) %>
                                    </td>
                                    <td>
                                        <%#Eval("UserName")%>
                                    </td>
                                    <td>
                                        <%#Eval("StaffName")%>
                                    </td>
                                    <td>
                                        <%#Eval("UnitName")%>
                                    </td>
                                    <td align="center">
                                        <asp:ImageButton ID="btnEdit" runat="server" ImageUrl="~/images/i_edit.gif" ToolTip="Edit"
                                            CommandArgument='<%#Eval("UserID")%>' CommandName="Edit" />
                                        &nbsp;
                                        <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="~/images/i_delete.gif" ToolTip="Delete"
                                            CommandArgument='<%#Eval("UserID")%>' CommandName="Delete" OnClientClick="return confirm('Are you sure delete this user?')" />
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <input type="hidden" id="formId" value="UserManagement" />
</asp:Content>
